﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace MainWebPage
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           

            HyperLink_Aboutus.Text = "About Us";
            HyperLink_Specials.Text = "Specials";
            HyperLink_Search.Text = "Advanced Search";
            HyperLink_Account.Text = "Create an account";
            HyperLink_Login.Text = "Customer Login";

            HyperLink_Aboutus.NavigateUrl = "http://www.baidu.com";
            HyperLink_Specials.NavigateUrl = "http://www.baidu.com";
            HyperLink_Search.NavigateUrl = "http://www.baidu.com";
            HyperLink_Account.NavigateUrl = "http://www.baidu.com";
            HyperLink_Login.NavigateUrl = "http://www.baidu.com";

            HyperLink HyperLink_Home = new HyperLink();
            HyperLink HyperLink_Newproducts = new HyperLink();
            HyperLink HyperLink_Contacts = new HyperLink();
            HyperLink HyperLink_Myaccount = new HyperLink();
            HyperLink HyperLink_Shoppingcart = new HyperLink();
            HyperLink HyperLink_Checkout = new HyperLink();
            

            HyperLink_Home.Text = "Home";
            HyperLink_Newproducts.Text = "New Products";
            HyperLink_Contacts.Text = "Contacts";
            HyperLink_Myaccount.Text = "My Account";
            HyperLink_Shoppingcart.Text = "Shopping Cart";
            HyperLink_Checkout.Text = "Checkout";

            HyperLink_Home.NavigateUrl = "http://www.baidu.com";
            HyperLink_Newproducts.NavigateUrl = "http://www.baidu.com";
            HyperLink_Contacts.NavigateUrl = "http://www.baidu.com";
            HyperLink_Myaccount.NavigateUrl = "http://www.baidu.com";
            HyperLink_Shoppingcart.NavigateUrl = "http://www.baidu.com";
            HyperLink_Checkout.NavigateUrl = "http://www.baidu.com";

 

            TableRow onerow = new TableRow();
            Table_Row.Rows.Add(onerow);
            Table_Row.Width = 1000;
            Table_Row.Height = 50;

            TableCell cell = new TableCell();
            onerow.Cells.Add(cell);
            cell.Width=50;
            //cell.BackColor = System.Drawing.Color.FromName("White");
            

            TableCell HomeCell = new TableCell();
            onerow.Cells.Add(HomeCell);
            HomeCell.Controls.Add(HyperLink_Home);
            HomeCell.BackColor = System.Drawing.Color.FromName("#cccccc");
            HomeCell.Width = 100;

            TableCell NewproductsCell = new TableCell();
            onerow.Cells.Add(NewproductsCell);
            NewproductsCell.Controls.Add(HyperLink_Newproducts);
            NewproductsCell.BackColor = System.Drawing.Color.FromName("#cccccc");
            NewproductsCell.Width = 100;

            TableCell ContactsCell = new TableCell();
            onerow.Cells.Add(ContactsCell);
            ContactsCell.Controls.Add(HyperLink_Contacts);
            ContactsCell.BackColor = System.Drawing.Color.FromName("#cccccc");
            ContactsCell.Width = 100;

            TableCell MyaccountCell = new TableCell();
            onerow.Cells.Add(MyaccountCell);
            MyaccountCell.Controls.Add(HyperLink_Myaccount);
            MyaccountCell.BackColor = System.Drawing.Color.FromName("#cccccc");
            MyaccountCell.Width = 100;

            TableCell ShoppingcartCell = new TableCell();
            onerow.Cells.Add(ShoppingcartCell);
            ShoppingcartCell.Controls.Add(HyperLink_Shoppingcart);
            ShoppingcartCell.BackColor = System.Drawing.Color.FromName("#cccccc");
            ShoppingcartCell.Width = 100;

            TableCell CheckoutCell = new TableCell();
            onerow.Cells.Add(CheckoutCell);
            CheckoutCell.Controls.Add(HyperLink_Checkout);
            CheckoutCell.BackColor = System.Drawing.Color.FromName("#cccccc");
            CheckoutCell.Width = 100;

            TableRow therow = new TableRow();
            Table Table_Newproducts = new Table();

            TableCell FirstCell = new TableCell();
            TableCell SecondCell = new TableCell();
            TableCell ThirdCell = new TableCell();
            Table_All.Rows.Add(therow);
            therow.Cells.Add(FirstCell);
            therow.Cells.Add(SecondCell);
            therow.Cells.Add(ThirdCell);
            FirstCell.Width = 400;
            SecondCell.Controls.Add(Table_Newproducts);


            TableRow Firstrow = new TableRow();
            Table_Newproducts.Rows.Add(Firstrow);

            TableCell Firstrow_Image = new TableCell();
            Firstrow.Cells.Add(Firstrow_Image);
            Image FirstImage = new Image();
            Firstrow_Image.Controls.Add(FirstImage);
            FirstImage.ImageUrl = "../1.gif";

            TableCell Firstrow_Price = new TableCell();
            Firstrow.Cells.Add(Firstrow_Price);
            Label FirstPrice = new Label();
            Firstrow_Price.Controls.Add(FirstPrice);
            FirstPrice.Text = "$100";
            FirstPrice.ForeColor = System.Drawing.Color.FromName("Red");
            FirstPrice.Font.Size=30;
            FirstPrice.Font.Bold=true;

            TableCell Firstrow_Info = new TableCell();
            Firstrow.Cells.Add(Firstrow_Info);
            Button FirstInfo = new Button();
            Firstrow_Info.Controls.Add(FirstInfo);
            FirstInfo.Text = "More Info";

            TableCell Firstrow_Cart = new TableCell();
            Firstrow.Cells.Add(Firstrow_Cart);
            Button FirstCart = new Button();
            Firstrow_Cart.Controls.Add(FirstCart);
            FirstCart.Text = "Add To Cart";

            TableRow Secondrow = new TableRow();
            Table_Newproducts.Rows.Add(Secondrow);

            TableCell Secondrow_Image = new TableCell();
            Secondrow.Cells.Add(Secondrow_Image);
            Image SecondImage = new Image();
            Secondrow_Image.Controls.Add(SecondImage);
            SecondImage.ImageUrl = "../2.gif";

            TableCell Secondrow_Price = new TableCell();
            Secondrow.Cells.Add(Secondrow_Price);
            Label SecondPrice = new Label();
            Secondrow_Price.Controls.Add(SecondPrice);
            SecondPrice.Text = "$100";
            SecondPrice.ForeColor = System.Drawing.Color.FromName("Red");
            SecondPrice.Font.Size = 30;
            SecondPrice.Font.Bold = true;

            TableCell Secondrow_Info = new TableCell();
            Secondrow.Cells.Add(Secondrow_Info);
            Button SecondInfo = new Button();
            Secondrow_Info.Controls.Add(SecondInfo);
            SecondInfo.Text = "More Info";

            TableCell Secondrow_Cart = new TableCell();
            Secondrow.Cells.Add(Secondrow_Cart);
            Button SecondCart = new Button();
            Secondrow_Cart.Controls.Add(SecondCart);
            SecondCart.Text = "Add To Cart";

            TableRow Thirdrow = new TableRow();
            Table_Newproducts.Rows.Add(Thirdrow);

            TableCell Thirdrow_Image = new TableCell();
            Thirdrow.Cells.Add(Thirdrow_Image);
            Image ThirdImage = new Image();
            Thirdrow_Image.Controls.Add(ThirdImage);
            ThirdImage.ImageUrl = "../3.gif";

            TableCell Thirdrow_Price = new TableCell();
            Thirdrow.Cells.Add(Thirdrow_Price);
            Label ThirdPrice = new Label();
            Thirdrow_Price.Controls.Add(ThirdPrice);
            ThirdPrice.Text = "$100";
            ThirdPrice.ForeColor = System.Drawing.Color.FromName("Red");
            ThirdPrice.Font.Size = 30;
            ThirdPrice.Font.Bold = true;

            TableCell Thirdrow_Info = new TableCell();
            Thirdrow.Cells.Add(Thirdrow_Info);
            Button ThirdInfo = new Button();
            Thirdrow_Info.Controls.Add(ThirdInfo);
            ThirdInfo.Text = "More Info";

            TableCell Thirdrow_Cart = new TableCell();
            Thirdrow.Cells.Add(Thirdrow_Cart);
            Button ThirdCart = new Button();
            Thirdrow_Cart.Controls.Add(ThirdCart);
            ThirdCart.Text = "Add To Cart";

            TableRow Fourthrow = new TableRow();
            Table_Newproducts.Rows.Add(Fourthrow);

            TableCell Fourthrow_Image = new TableCell();
            Fourthrow.Cells.Add(Fourthrow_Image);
            Image FourthImage = new Image();
            Fourthrow_Image.Controls.Add(FourthImage);
            FourthImage.ImageUrl = "../4.gif";

            TableCell Fourthrow_Price = new TableCell();
            Fourthrow.Cells.Add(Fourthrow_Price);
            Label FourthPrice = new Label();
            Fourthrow_Price.Controls.Add(FourthPrice);
            FourthPrice.Text = "$100";
            FourthPrice.ForeColor = System.Drawing.Color.FromName("Red");
            FourthPrice.Font.Size = 30;
            FourthPrice.Font.Bold = true;

            TableCell Fourthrow_Info = new TableCell();
            Fourthrow.Cells.Add(Fourthrow_Info);
            Button FourthInfo = new Button();
            Fourthrow_Info.Controls.Add(FourthInfo);
            FourthInfo.Text = "More Info";

            TableCell Fourthrow_Cart = new TableCell();
            Fourthrow.Cells.Add(Fourthrow_Cart);
            Button FourthCart = new Button();
            Fourthrow_Cart.Controls.Add(FourthCart);
            FourthCart.Text = "Add To Cart";

            //ListBox TheList = new ListBox();
            //ThirdCell.Controls.Add(TheList);

        }
    }
}
